ARC
ARC_R

Syntax: ARC [#ch] { [,x1,y1] TO x2,y2,angle }
    and ARC_R [#ch] { [,x1,y1] TO x2,y2,angle }

Location: QL ROM

ARC causes the two points at the co-ordinates (x1,y1) and (x2,y2) to be connected with an arc. The arc is defined as the sector of the circle formed by drawing two straight lines from the two given co-ordinates to the centre of the circle, where angle is the angle (in radians) between those two lines. Therefore, angle=0 is a straight line and angle=PI, half a circle.

It therefore follows that the greater ABS(angle), the more pronounced is the curve on the arc.

Multiple arcs can be draw with the same command by adding extra sets of parameters for each additional arc.

Example:

ARC #2,100,10 TO 120,40,3 TO 80,70,3

When drawing multiple arcs, there is actually no need for the next arc in the series to begin at the end of the previous arc, provided that a semicolon is inserted between each set of parameters.

Example:
ARC 100,10 TO 120,40,3;30,40 TO 50,60,3

Whether the arc is drawn clockwise or anti-clockwise depends upon two factors: If y1>y2 and angle>0, then the arc will be drawn anti-clockwise.  Swapping the two co-ordinates or making the angle negativewill force the arc to be drawn clockwise.

Co-ordinates refer to the window relative graphic co-ordinate system, which is relative to the graphic origin. The size and position of the arc also depend upon the SCALE of the window. If no first point is given then the current position of the graphic cursor is used. The graphic cursor is set to the last point of the arc on completion of the command.

ARC_R works in exactly the same way as ARC but uses a relative co-ordinate system, where theorigin is the current position of the graphic cursor.

CROSS-REFERENCE:
SCALE sets the graphic origin and also the size of the window.
